Skip to content

Conversation

@razor-x
Copy link

@razor-x razor-x commented Jan 13, 2026

What does this PR do?

Closes #3657 (which should have been re-opened)

Summary

  • Normalize ParsedKey events so ctrl+space (NUL) and ctrl+_ map to named keys in one place, and simplify key parsing to rely on that normalization (packages/opencode/src/util/keybind.ts:13, packages/opencode/src/cli/cmd/tui/context/keybind.tsx:76).
  • Add a focused unit test that fails pre-fix by asserting NUL maps to ctrl+space (packages/opencode/test/keybind.test.ts:190).

How did you verify your code works?

Tested locally and added test for key detection. Test verified failing before src changes.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found.

The search results show PR #8156 (the current PR) and some related keybind PRs (#8151, #5218, #6753), but none of these are duplicates addressing the same ctrl+space leader key issue. PR #8151 is about a different keybind problem (app_exit keybind), and the others are about different aspects of keybinding functionality.

@razor-x razor-x force-pushed the fix-ctrl-space-leader branch from f8e838f to 3b38ed1 Compare January 13, 2026 08:02
@razor-x razor-x marked this pull request as ready for review January 13, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

space key in leader keybind

1 participant